<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>鼠标事件</title>
  <style>
    .wrapper {
      margin: 2em;
      width: 400px;
      height: 400px;
      background: #ddf;
    }

    .inner {
      width: 200px;
      height: 200px;
      background: #c90;
    }
  </style>
</head>
<body>
  <div class="wrapper">
    <div class="inner"></div>
  </div>
  <script>
    window.onload = function () {
      let wrapper = document.querySelector('.wrapper')
      wrapper.addEventListener('mouseover', function() {
        console.log('enter!')
      })
    }
  </script>
</body>
</html>
